package ms.unicorn.simulation;

import java.io.PrintStream;

public class Simulation {
	
	public static void main(String[] args) {
		//fd.propagateDAT();
		PrintStream out = System.out;
		int n = 10;
		int h = 10;
		out.println("Leaves,Height,Requirements,Compounds,Initialization,Propagation");
		
		/*for (n = 10; n<=100; n+=5) {
			FDGraph fd = new FDGraph(n, h);
			fd.propagateDAT();
			int counts[] = fd.getNodesCount();
			out.printf("%d,%d,%d,%d,%s,%s\n", n, h, counts[FDNode.FDNODE_REQUIREMENT], 
					counts[FDNode.FDNODE_COMPOUND], fd.timeInitialization, fd.timePropagation);
		}*/
		for(h = 20; h <= 20; h+=5) 
			for(n = 10; true; n+=5) {
				FDGraph fd = new FDGraph(n, h);
				fd.propagateDAT();
				int counts[] = fd.getNodesCount();
				out.printf("%d,%d,%d,%d,%s,%s\n", n, h, counts[FDNode.FDNODE_REQUIREMENT], 
						counts[FDNode.FDNODE_COMPOUND], fd.timeInitialization, fd.timePropagation);
				if (fd.getNodes().size() > 80000)
					break;
			}
	}
}
